<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="__ROOT__/static/blupilot/css/style.css" />
    <link rel="stylesheet" href="__ROOT__/static/blupilot/css/swiper-3.4.2.min.css" />
    <link rel="stylesheet" href="__ROOT__/static/blupilot/layui/css/modules/layer/default/layer.css" />

    <link href="__ROOT__/static/hadmin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__ROOT__/static/hadmin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <title>Application Center {$site_info.site_name|default=''}</title>
    <include file="public@header_app" />
    <div class="main ys">
        <div class="bb">
            <div class="fl item0 itembox <if condition=" $type eq '1' ">active</if>">
                <a href="{:url('user/app/index',['type'=>'1'])}">
                    User Management
                </a>
            </div>
            <div class="fl item1 itembox <if condition=" $type eq '2' ">active</if>">
                <a href="{:url('user/app/index',['type'=>'2'])}">
                     Number of developers.
                </a>
            </div>
            <div class="fl item2 itembox <if condition=" $type eq '3' ">active</if>">
                <a href="{:url('user/app/index',['type'=>'3'])}">
                    Application
                </a>
            </div>
            <div class="fl item3 itembox <if condition=" $type eq '4' ">active</if>">
                <a href="{:url('user/app/index',['type'=>'4'])}">Location data statistics</a>
            </div>
            <div class="fl item3 itembox">
                <a href="{:url('shop/order/index')}">Order</a>
            </div>
            <div class="clearboth"></div>
        </div>
        <div class="myitem0 bg">
            <if condition="$type eq '1'">
                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-content">
                    
                                        <table class="table table-striped table-bordered table-hover dataTables-example">
                                            <thead>
                                                <tr>
                                                    <th>ID</th>
                                                    <th>UserName</th>
                                                    <th>Create Time</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <volist name="type_1_lists" id="vo" key="k">
                                                    <tr class="gradeX">
                                                        <td>
                                                            {$k}
                                                        </td>
                                                        <td>
                                                            {$vo.user_login}
                                                        </td>
                                                        <td>
                                                            {$vo.create_time|date='Y-m-d H:i:s',###}
                                                        </td>
                                                    </tr>
                                                </volist>
                    
                                            </tbody>
                                        </table>
                    
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <elseif condition="$type eq '2'" />
                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="echarts" id="echarts-line-chart"></div>
                            </div>
                        </div>
                    </div>
                <elseif condition="$type eq '3'" />
                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-content">
                    
                                        <table class="table table-striped table-bordered table-hover dataTables-example">
                                            <thead>
                                                <tr>
                                                    <th>ID</th>
                                                    <th>Title</th>
                                                    <th>APPKEY</th>
                                                    <th>Count</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <volist name="type_3_lists" id="vo" key="k">
                                                    <tr class="gradeX">
                                                        <td>
                                                            {$k}
                                                        </td>
                                                        <td>
                                                            {$vo.app_name}
                                                        </td>
                                                        <td>
                                                            {$vo.app_key}
                                                        </td>
                                                        <td>
                                                            {$vo.count}
                                                        </td>
                                                    </tr>
                                                </volist>
                    
                                            </tbody>
                                        </table>
                    
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <elseif condition="$type eq '4'" />
                    <div class="wrapper wrapper-content animated fadeInRight">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-content">
                    
                                        <table class="table table-striped table-bordered table-hover dataTables-example">
                                            <thead>
                                                <tr>
                                                    <th>ID</th>
                                                    <th>Title</th>
                                                    <th>APPKEY</th>
                                                    <th>Beacon Title</th>
                                                    <th>Beacon Mac</th>
                                                    <th>RSSI</th>
                                                    <th>Location</th>
                                                    <th>Date(Hour minutes secoud)</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <volist name="type_4_lists" id="vo" key="k">
                                                    <tr class="gradeX">
                                                        <td>
                                                            {$k}
                                                        </td>
                                                        <td>
                                                            {$vo.app_name}
                                                        </td>
                                                        <td>
                                                            {$vo.app_key}
                                                        </td>
                                                        <td>
                                                            {$vo.info_name}
                                                        </td>
                                                        <td>
                                                            {$vo.mac}
                                                        </td>
                                                        <td>
                                                            {$k}
                                                        </td>
                                                        <td>
                                                            {$k}
                                                        </td>
                                                        <td>
                                                            {$vo.update_time|date='Y-m-d H:i:s',###}
                                                        </td>
                                                    </tr>
                                                </volist>
                    
                                            </tbody>
                                        </table>
                    
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <else/>
            </if>
        </div>
    </div>
    <include file="public@footer_app" />
    </body>

</html>

<!-- Data Tables -->
<link href="__ROOT__/static/hadmin/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

<link href="__ROOT__/static/hadmin/css/animate.css" rel="stylesheet">
<link href="__ROOT__/static/hadmin/css/style.css?v=4.1.0" rel="stylesheet">


<!-- 全局js -->
<script src="__ROOT__/static/hadmin/js/jquery.min.js?v=2.1.4"></script>
<script src="__ROOT__/static/hadmin/js/bootstrap.min.js?v=3.3.6"></script>



<script src="__ROOT__/static/hadmin/js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="__ROOT__/static/hadmin/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="__ROOT__/static/hadmin/js/plugins/dataTables/dataTables.bootstrap.js"></script>


<!-- Page-Level Scripts -->
<script>
    $(document).ready(function () {
        $('.dataTables-example').dataTable();
    });
</script>

<!-- ECharts -->
<script src="__ROOT__/static/hadmin/js/plugins/echarts/echarts-all.js"></script>

<!-- ECharts demo data -->
<script>
    $(function () {
            var lineChart = echarts.init(document.getElementById("echarts-line-chart"));
            var lineoption = {
                title: {
                    text: '统计'
                },
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    data: ['开发者']
                },
                grid: {
                    x: 40,
                    x2: 40,
                    y2: 24
                },
                calculable: true,
                xAxis: [
                    {
                        type: 'category',
                        boundaryGap: false,
                        data: [
                            <volist name="date" id="vo">
                            '{$vo}',
                            </volist>
                        ]
                    }
                ],
                yAxis: [
                    {
                        type: 'value',
                        axisLabel: {
                            formatter: '{value}'
                        }
                    }
                ],
                series: [
                    {
                        name: '数量',
                        type: 'line',
                        data: [
                            <volist name="count" id="vo">
                            {$vo},
                            </volist>
                        ],
                        markPoint: {
                            data: [
                                { type: 'max', name: '最大值' },
                                { type: 'min', name: '最小值' }
                            ]
                        },
                        markLine: {
                            data: [
                                { type: 'average', name: '平均值' }
                            ]
                        }
                    }
                ]
            };
            lineChart.setOption(lineoption);
            $(window).resize(lineChart.resize);
        });
</script>

